using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace WMSSystem.Domain.Workflow
{
    /// <summary>
    /// WorkflowCore执行指针表
    /// </summary>
    public class WorkflowExecutionPointers
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [Description("主键ID")]
        [MaxLength(64)]
        [Key]
        public string Id { get; set; }

        /// <summary>
        /// 工作流实例ID
        /// </summary>
        [Description("工作流实例ID")]
        [MaxLength(64)]
        public string WorkflowInstanceId { get; set; }

        /// <summary>
        /// 步骤ID
        /// </summary>
        [Description("步骤ID")]
        public int StepId { get; set; }

        /// <summary>
        /// 是否激活
        /// </summary>
        [Description("是否激活")]
        public bool Active { get; set; }

        /// <summary>
        /// 睡眠直到时间
        /// </summary>
        [Description("睡眠直到时间")]
        public long? SleepUntil { get; set; }

        /// <summary>
        /// 持久化数据
        /// </summary>
        [Description("持久化数据")]
        public string? PersistenceData { get; set; }

        /// <summary>
        /// 事件名称
        /// </summary>
        [Description("事件名称")]
        [MaxLength(100)]
        public string? EventName { get; set; }

        /// <summary>
        /// 事件键
        /// </summary>
        [Description("事件键")]
        [MaxLength(100)]
        public string? EventKey { get; set; }

        /// <summary>
        /// 事件已发布
        /// </summary>
        [Description("事件已发布")]
        public bool EventPublished { get; set; }

        /// <summary>
        /// 事件数据
        /// </summary>
        [Description("事件数据")]
        public string? EventData { get; set; }

        /// <summary>
        /// 步骤名称
        /// </summary>
        [Description("步骤名称")]
        [MaxLength(100)]
        public string? StepName { get; set; }

        /// <summary>
        /// 重试计数
        /// </summary>
        [Description("重试计数")]
        public int RetryCount { get; set; }

        /// <summary>
        /// 子项
        /// </summary>
        [Description("子项")]
        public string? Children { get; set; }

        /// <summary>
        /// 上下文项
        /// </summary>
        [Description("上下文项")]
        public string? ContextItem { get; set; }

        /// <summary>
        /// 先决条件ID
        /// </summary>
        [Description("先决条件ID")]
        [MaxLength(64)]
        public string? PredecessorId { get; set; }

        /// <summary>
        /// 输出
        /// </summary>
        [Description("输出")]
        [MaxLength(255)]
        public string? Outcome { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [Description("状态")]
        public int Status { get; set; }

        /// <summary>
        /// 作用域
        /// </summary>
        [Description("作用域")]
        [MaxLength(100)]
        public string? Scope { get; set; }
    }
} 